GetMoviePreferredVolume
TheGetMoviePreferredVolume
function returns a movie's preferred volume setting.
pascal short GetMoviePreferredVolume (Movie theMovie);
theMovie
- Specifies the movie for this operation. Your application obtains this movie identifier from such functions as
NewMovie
,NewMovieFromFile
, andNewMovieFromHandle
(described on page 2-80, page 2-76, and page 2-78, respectively).DESCRIPTION
TheGetMoviePreferredVolume
function returns a 16-bit, fixed-point number that contains the movie's default volume. The high-order 8 bits contain the integer part of the value; the low-order 8 bits contain the fractional part. Volume values range from 0.0 to 1.0.You can change a movie's current volume by calling the
SetMovieVolume
function, which is described on page 2-167.A movie's tracks have their own volume settings. Use the
SetTrackVolume
function, described on page 2-168, to set the volume of an individual track. A track's volume is scaled by the movie's volume to produce the track's final volume. Furthermore, the movie's volume is scaled by the sound volume that is returned by the Operating System'sGetSoundVol
routine (described in Inside Macintosh: More Macintosh Toolbox). Thus, the user can control the overall volume from the Sound control panel.ERROR CODES
invalidMovie -2010 This movie is corrupted or invalid SEE ALSO
When a movie is loaded, the current setting is set to preferred volume. TheStartMovie
function (described on page 2-98) uses this volume setting when it starts playing a movie.